<?php $view->extend('::base.html.php') ?>
<?php echo $view->render('RMDAccountBundle::flashMessages.html.php') ?>
<?php
if ($lists->count()) :
	foreach ($lists as $list) : 
?>
		<div>
			<h4><a href="<?php echo $view['router']->generate('account_subscribers', array('listid' => $list->getId())); ?>"><?php echo $view->escape($list->getTitle()); ?></a></h4>
		</div>
		<div>
			Subscribers: <?php echo $view['actions']->render('RMDAccountBundle:Lists:countSubscribers', array('listid' => $list->getId())); ?>
		</div>
		<hr/>
<?php endforeach;
?>
	<div>
		<a href="<?php echo $view['router']->generate('account_lists_create'); ?>">Create new list</a>
	</div>
<?php 
else :
?>
	<div>
		There are no lists created yet.<br/>
		<a href="<?php echo $view['router']->generate('account_lists_create'); ?>">Create one</a>
	</div>
<?php
endif;
?>
